1. Field of the Invention
The present invention relates to image processors used for facsimile, etc.
2. Description of the Related Art
As shown in FIG. 1, a conventional image processor includes input terminal 1 for data input, adder 2 which adds 2 data items, threshold generator 3 which generates a threshold used as a reference for binary processing, comparator 4 which converts multi-level data to binary data, output terminal 5 which outputs the binary data, subtracter 6 which subtracts between 2 data items, error memory 7 which stores calculated errors, and error filter 8 which calculates correction values.
Input terminal 1 inputs data resulting from a document which is resolved into pixels by a scanner, etc., then converted to multi-level image signals. Adder 2 adds a correction value output from error filter 8 to multi-level data (hereinafter referred to as xe2x80x9cinput dataxe2x80x9d) of the target pixel input from input terminal 1 to generate correction data, and outputs it to comparator 4 and subtracter 6. Comparator 4 generates output data by converting the correction data to binary data based on the threshold generated from threshold generator 3, outputs it to other devices via output terminal 5, and at the same time outputs it to subtracter 6. Subtracter 6 subtracts the output data from the correction data and stores the subtraction result in error memory 7 as an error. Error filter 8 generates a correction value by adding binary errors E(a) to E(d) of peripheral pixels xe2x80x9caxe2x80x9d to xe2x80x9cdxe2x80x9d around target pixel xe2x80x9cpxe2x80x9d stored in error memory 7, each weighted with certain percentage, and outputs the correction value to adder 2.
The operation of the conventional image processor above is described below.
First, in adder 2, the correction value is added to the input data to generate correction data, and is output to comparator 4 and subtracter 6. Then, in comparator 4, the correction data is converted to binary data based on the threshold generated from threshold generator 3 to generate output data, and the data is output to other devices via output terminal 5, and at the same time output to subtracter 6. Then in subtracter 6, the output data is subtracted from the correction data, and thereby a binary error of the target pixel is calculated, and stored in error memory 7. The binary error stored in error memory 7 is weighted with the certain percentage in error filter 8 to generate a correction value, and the correction value is output to subtracter 2.
As describe above, the conventional image processor intends to improve the image quality by diffusing toward peripheral pixels binary errors which are obtained by subtracting the output data from the correction data which is a sum of the input data and correction value.
However, since the conventional image processor above keeps always fixed weighting percentage of binary errors, it has the problem of generating texture patterns peculiar to error diffusion on images with less concentration variations, degrading the gradation characteristic and resolution.
Further, since the conventional image processor above has propagation errors which vary drastically at areas where black and white points change drastically, the output data of the target pixel is affected by previous errors, producing the problem of white missing or black crushing as well.
It is a first object of the present invention to provide an image processor which suppresses generation of texture patterns peculiar to error diffusion, and thereby is in gradation characteristic and resolution.
The present invention achieves the above object by maintaining a plurality of coefficient candidates, selecting a propagation coefficient from said coefficient candidates according to the input data, and propagating to peripheral pixels a value obtained by multiplying the binary errors by said propagation coefficient.
It is a second object of the present invention to provide an image processor which suppresses generation of white missing or black crushing at areas where black and white points change drastically.
The present invention achieves the above object by controlling the propagation coefficient based on whether the variation between the input data of the target pixel and the input data of the pixel where binary errors are propagated is greater than a reference value or not.
It is a third object of the present invention to provide an image processor which reduces overlapping dots between different colors, and thereby handles color images with excellent color reproducibility.
The present invention achieves the above object by maintaining a plurality of coefficient candidates for each color, selecting a propagation coefficient from the coefficient candidates corresponding to the color of the target pixel, and propagating to peripheral pixels a value obtained by multiplying the binary errors by said propagation coefficient.
Further the present invention achieves the above object by using an alternative error that does not depend on a propagation error from the target pixel, as the propagation error in an error propagation direction, when a pixel variation is larger than a reference value in the error propagation direction.